package org.yijiaganxi.common.entity.coupon;

import java.math.BigDecimal;
import java.util.Date;

import javax.validation.constraints.NotBlank;

import org.yijiaganxi.common.entity.delivery.YjgxDelivery;
import org.yijiaganxi.common.entity.delivery.YjgxDelivery.YjgxDeliveryBuilder;

import com.baomidou.mybatisplus.annotations.TableField;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * <p>
 * 优惠券管理
 * </p>
 *
 * @author zhangguowei123
 * @since 2020-08-30
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class YjgxCoupon implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long id;
    @TableField("createDate")
    private Date createDate;
    @TableField("modifyDate")
    private Date modifyDate;
    @TableField("createUser")
    private String createUser;
    @TableField("modifyUser")
    private String modifyUser;
    
    
    @NotBlank(message = "优惠券名称必填")
    private String name;
    /**
     * 优惠金额
     */
    @NotBlank(message = "优惠券金额必填")
    @TableField("discountPrice")
    private BigDecimal discountPrice;
    /**
     * 使用满足条件
     */
    @NotBlank(message = "优惠券使用条件必填")
    @TableField("usePrice")
    private BigDecimal usePrice;
    /**
     * 有效期开始时间
     */
    @NotBlank(message = "有效期开始时间必填")
    @TableField("startDate")
    private Date startDate;
    /**
     * 有效期结束时间
     */
    @NotBlank(message = "有效期结束时间必填")
    @TableField("endDate")
    private Date endDate;
    /**
     * 总投放数量  -1代表不限制
     */
    @TableField("putTotalNum")
    private Integer putTotalNum;
    /**
     * 没人限制领取数量  -1 不限制
     */
    @TableField("peopleLimit")
    private Integer peopleLimit;
    /**
     * 已领取数量
     */
    @TableField("receiveNum")
    private Integer receiveNum;
    /**
     * 0线上  1线下  
     */
    @NotBlank(message = "选择封面不能为空")
    private Integer type;
    private Integer sort;
    /**
     * 0  不启用   1启用
     */
    @NotBlank(message = "选择封面不能为空")
    private Integer status;

    @TableField("property")
    private String property;
    
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getModifyDate() {
        return modifyDate;
    }

    public void setModifyDate(Date modifyDate) {
        this.modifyDate = modifyDate;
    }

    public String getCreateUser() {
        return createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    public String getModifyUser() {
        return modifyUser;
    }

    public void setModifyUser(String modifyUser) {
        this.modifyUser = modifyUser;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public BigDecimal getDiscountPrice() {
        return discountPrice;
    }

    public void setDiscountPrice(BigDecimal discountPrice) {
        this.discountPrice = discountPrice;
    }

    public BigDecimal getUsePrice() {
        return usePrice;
    }

    public void setUsePrice(BigDecimal usePrice) {
        this.usePrice = usePrice;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public Integer getPutTotalNum() {
        return putTotalNum;
    }

    public void setPutTotalNum(Integer putTotalNum) {
        this.putTotalNum = putTotalNum;
    }

    public Integer getPeopleLimit() {
        return peopleLimit;
    }

    public void setPeopleLimit(Integer peopleLimit) {
        this.peopleLimit = peopleLimit;
    }

    public Integer getReceiveNum() {
        return receiveNum;
    }

    public void setReceiveNum(Integer receiveNum) {
        this.receiveNum = receiveNum;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return "YjgxCoupon{" +
        "id=" + id +
        ", createDate=" + createDate +
        ", modifyDate=" + modifyDate +
        ", createUser=" + createUser +
        ", modifyUser=" + modifyUser +
        ", name=" + name +
        ", discountPrice=" + discountPrice +
        ", usePrice=" + usePrice +
        ", startDate=" + startDate +
        ", endDate=" + endDate +
        ", putTotalNum=" + putTotalNum +
        ", peopleLimit=" + peopleLimit +
        ", receiveNum=" + receiveNum +
        ", type=" + type +
        ", sort=" + sort +
        ", status=" + status +
        "}";
    }
}
